<template>
  <div class="detailbaseinfo b_margin">
    <good-base-info v-if="datas">
      <template #price>
        {{price_s | showPrice}}
      </template>
      <template #price_s>
        {{datas.price | showPrice}}
      </template>
      <template #count_s>
        {{datas.discount}}折
      </template>
      <template #good_name>
        {{datas.gname}}
      </template>
      <template #content_r>
        帮我选
      </template>
      <template #bottom_l>
        {{express}}
      </template>   
      <template #bottom_r>
        {{datas.addr}}
      </template>    
    </good-base-info>
  </div>
</template>

<script>
import GoodBaseInfo from "components/public/good_baseinfo/GoodBaseInfo";
export default {
  name: "DetailBaseInfo",
  props: {
    datas: {
      type: Object
    }
  },
  components: {
    GoodBaseInfo
  },
  computed:{
    price_s(){
      return this.datas.price*this.datas.discount*0.1
    },
    express(){
      let express = this.datas.express==0?'免运费':`运费：${this.datas.express.toFixed(2)}`;
      return express
    }
  }
};
</script>

<style lang="less" scoped>
</style>